'use strict';
/* Controller for adding a new entry*/

blogApp.controller('deleteCommentCtrl',['$scope', '$http','$stateParams','$state',
    function($scope, $http, $stateParams,$state) {
            $scope.deleteComment = function(id) {
                $http({
                   url: 'comments/delete/'+id,
                   method: "delete",
                   }).success(function() {
                    console.log("Deleted");
                    $state.go('listAdmin', $stateParams, {reload:true});
                    //$state.reload();
                });


            };
          }
]);